"""
    支付管理信息
"""
import time

from Page.Page1 import Page1
from selenium.webdriver.common.by import By

class Page3(Page1):
    # 支付管理
    PaymentManagement_lco = (By.XPATH,'//*[@id="sidebar"]/div[2]/div[7]/h2')
    # 支付管理信息
    PaymentManagement_message_lco = (By.XPATH,'//*[@id="sidebar"]/div[2]/div[8]/ul/li[1]/div/a')
    # 输入框查询
    Select_productName_loc  = (By.XPATH,'//*[@id="navTab"]/div[2]/div[2]/div[1]/form/div/table/tbody/tr/td[1]/input')
    #查询按钮
    select_button_loc = (By.XPATH,'//*[@id="navTab"]/div[2]/div[2]/div[1]/form/div/table/tbody/tr/td[2]/div/div/button')
    # 设置支付方式
    set_payWay_loc = (By.XPATH,'//*[@id="navTab"]/div[2]/div[2]/div[2]/div[2]/div[2]/div/table/tbody/tr/td[6]/div/a[1]')
    # 添加支付方式
    add_payWay_lco = (By.XPATH,'//*[@id="navTab"]/div[2]/div[3]/div[2]/div[1]/ul/li[1]/a/span')
    # 支付方式
    payWayCode_loc = (By.XPATH,'//*[@id="payWayCode"]')
    payWayCode_01_loc = (By.XPATH,'//*[@id="payWayCode"]/option[2]')
    # 费率
    fl_loc = (By.NAME,'payRate')

    def PaymentManagement(self):
        self.click(self.PaymentManagement_lco,3)
        time.sleep(3)
        self.click(self.PaymentManagement_message_lco, 20)

    def select_productName(self):
        self.input_text(self.Select_productName_loc,'西瓜')
        self.click(self.select_button_loc)

    def set(self):
        self.click(self.set_payWay_loc)
        self.click(self.add_payWay_lco)
        self.click(self.payWayCode_loc)
        self.click(self.payWayCode_01_loc)
        self.input_text(self.fl_loc,'0.1')





    def add_logguo_PayWay(self):
        self.login_longguo_001()
        self.PaymentManagement()
        time.sleep(3)
        self.select_productName()
        self.set()
        time.sleep(10)